<!DOCTYPE html>
<!-- saved from url=(0042)http://www.cnblogs.com/kreo/p/4368811.html -->
<html lang="zh-cn"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CentOS7安装iptables防火墙 - 太清 - 博客园</title>
<link type="text/css" rel="stylesheet" href="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/blog-common.css">
<link id="MainCss" type="text/css" rel="stylesheet" href="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/bundle-SimpleClear.css">
<link id="mobile-style" media="only screen and (max-width: 768px)" type="text/css" rel="stylesheet" href="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/bundle-SimpleClear-mobile.css">
<link title="RSS" type="application/rss+xml" rel="alternate" href="http://www.cnblogs.com/kreo/rss">
<link title="RSD" type="application/rsd+xml" rel="EditURI" href="http://www.cnblogs.com/kreo/rsd.xml">
<link type="application/wlwmanifest+xml" rel="wlwmanifest" href="http://www.cnblogs.com/kreo/wlwmanifest.xml">
<script async="" src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/analytics.js.下载"></script><script type="text/javascript" src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/encoder.js.下载"></script><script src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/jquery.js.下载" type="text/javascript"></script>  
<script type="text/javascript">var currentBlogApp = 'kreo', cb_enable_mathjax=false;var isLogined=false;</script>
<script src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/blog-common.js.下载" type="text/javascript"></script>
</head>
<body>
<a name="top"></a>

<div id="main">
<div id="header">
<h1><a id="Header1_HeaderTitle" href="http://www.cnblogs.com/kreo/">清园</a></h1>
<p id="tagline">沉没的Atlantis</p></div>

<div id="post_detail">
<div class="post">
    <h2 class="postTitle"><a id="cb_post_title_url" href="http://www.cnblogs.com/kreo/p/4368811.html">CentOS7安装iptables防火墙</a></h2>
    <div class="postText"><div id="cnblogs_post_body"><p><span style="line-height: 1.5;">CentOS7默认的防火墙不是iptables,而是firewalle.</span></p>
<p>安装iptable&nbsp;iptable-service</p>
<div class="cnblogs_code"><div class="cnblogs_code_toolbar"><span class="cnblogs_code_copy"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" title="复制代码"><img src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/copycode.gif" alt="复制代码"></a></span></div>
<pre><span style="color: #008000;">#</span><span style="color: #008000;">先检查是否安装了iptables</span>
<span style="color: #000000;">service iptables status
</span><span style="color: #008000;">#</span><span style="color: #008000;">安装iptables</span>
yum&nbsp;install&nbsp;-<span style="color: #000000;">y iptables
</span><span style="color: #008000;">#</span><span style="color: #008000;">升级iptables</span>
<span style="color: #000000;">yum update iptables 
</span><span style="color: #008000;">#</span><span style="color: #008000;">安装iptables-services</span>
yum install iptables-services</pre>
<div class="cnblogs_code_toolbar"><span class="cnblogs_code_copy"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" title="复制代码"><img src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/copycode.gif" alt="复制代码"></a></span></div></div>
<p>禁用/停止自带的firewalld服务</p>
<div class="cnblogs_code">
<pre><span style="color: #008000;">#</span><span style="color: #008000;">停止firewalld服务</span>
<span style="color: #000000;">systemctl stop firewalld
</span><span style="color: #008000;">#</span><span style="color: #008000;">禁用firewalld服务</span>
<span style="color: #000000;">systemctl mask firewalld</span></pre>
</div>
<p>设置现有规则</p>
<div class="cnblogs_code"><div class="cnblogs_code_toolbar"><span class="cnblogs_code_copy"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" title="复制代码"><img src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/copycode.gif" alt="复制代码"></a></span></div>
<pre><span style="color: #008000;">#</span><span style="color: #008000;">查看iptables现有规则</span>
iptables -L -<span style="color: #000000;">n
</span><span style="color: #008000;">#</span><span style="color: #008000;">先允许所有,不然有可能会杯具</span>
iptables -<span style="color: #000000;">P INPUT ACCEPT
</span><span style="color: #008000;">#</span><span style="color: #008000;">清空所有默认规则</span>
iptables <span style="color: #008080;">-F</span>
<span style="color: #008000;">#</span><span style="color: #008000;">清空所有自定义规则</span>
iptables -<span style="color: #000000;">X
</span><span style="color: #008000;">#</span><span style="color: #008000;">所有计数器归0</span>
iptables -<span style="color: #000000;">Z
</span><span style="color: #008000;">#</span><span style="color: #008000;">允许来自于lo接口的数据包(本地访问)</span>
iptables -A INPUT -i lo -<span style="color: #000000;">j ACCEPT
</span><span style="color: #008000;">#</span><span style="color: #008000;">开放22端口</span>
iptables -A INPUT -p tcp --dport 22 -<span style="color: #000000;">j ACCEPT
</span><span style="color: #008000;">#</span><span style="color: #008000;">开放21端口(FTP)</span>
iptables -A INPUT -p tcp --dport 21 -<span style="color: #000000;">j ACCEPT
</span><span style="color: #008000;">#</span><span style="color: #008000;">开放80端口(HTTP)</span>
iptables -A INPUT -p tcp --dport 80 -<span style="color: #000000;">j ACCEPT
</span><span style="color: #008000;">#</span><span style="color: #008000;">开放443端口(HTTPS)</span>
iptables -A INPUT -p tcp --dport 443 -<span style="color: #000000;">j ACCEPT
</span><span style="color: #008000;">#</span><span style="color: #008000;">允许ping</span>
iptables -A INPUT -p icmp --icmp-type 8 -<span style="color: #000000;">j ACCEPT
</span><span style="color: #008000;">#</span><span style="color: #008000;">允许接受本机请求之后的返回数据 RELATED,是为FTP设置的</span>
iptables -A INPUT -m state --state &nbsp;RELATED,ESTABLISHED -<span style="color: #000000;">j ACCEPT
</span><span style="color: #008000;">#</span><span style="color: #008000;">其他入站一律丢弃</span>
iptables -<span style="color: #000000;">P INPUT DROP
</span><span style="color: #008000;">#</span><span style="color: #008000;">所有出站一律绿灯</span>
iptables -<span style="color: #000000;">P OUTPUT ACCEPT
</span><span style="color: #008000;">#</span><span style="color: #008000;">所有转发一律丢弃</span>
iptables -P FORWARD DROP</pre>
<div class="cnblogs_code_toolbar"><span class="cnblogs_code_copy"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" title="复制代码"><img src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/copycode.gif" alt="复制代码"></a></span></div></div>
<p><span style="line-height: 1.5;">其他规则设定</span></p>
<div class="cnblogs_code"><div class="cnblogs_code_toolbar"><span class="cnblogs_code_copy"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" title="复制代码"><img src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/copycode.gif" alt="复制代码"></a></span></div>
<pre><span style="color: #008000;">#</span><span style="color: #008000;">如果要添加内网ip信任（接受其所有TCP请求）</span>
iptables -A INPUT -p tcp -s 45.96.174.68 -<span style="color: #000000;">j ACCEPT
</span><span style="color: #008000;">#</span><span style="color: #008000;">过滤所有非以上规则的请求</span>
iptables -<span style="color: #000000;">P INPUT DROP
</span><span style="color: #008000;">#</span><span style="color: #008000;">要封停一个IP，使用下面这条命令：</span>
iptables -I INPUT -s ***.***.***.*** -<span style="color: #000000;">j DROP
</span><span style="color: #008000;">#</span><span style="color: #008000;">要解封一个IP，使用下面这条命令:</span>
iptables -D INPUT -s ***.***.***.*** -j DROP</pre>
<div class="cnblogs_code_toolbar"><span class="cnblogs_code_copy"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" title="复制代码"><img src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/copycode.gif" alt="复制代码"></a></span></div></div>
<p>保存规则设定</p>
<div class="cnblogs_code">
<pre><span style="color: #008000;">#</span><span style="color: #008000;">保存上述规则</span>
service iptables save</pre>
</div>
<p><span style="line-height: 1.5;">开启iptables服务</span>&nbsp;</p>
<div class="cnblogs_code"><div class="cnblogs_code_toolbar"><span class="cnblogs_code_copy"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" title="复制代码"><img src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/copycode.gif" alt="复制代码"></a></span></div>
<pre><span style="color: #008000;">#</span><span style="color: #008000;">注册iptables服务</span><span style="color: #008000;">
#</span><span style="color: #008000;">相当于以前的chkconfig iptables on</span>
<span style="color: #000000;">systemctl enable iptables.service
</span><span style="color: #008000;">#</span><span style="color: #008000;">开启服务</span>
<span style="color: #000000;">systemctl start iptables.service
</span><span style="color: #008000;">#</span><span style="color: #008000;">查看状态</span>
systemctl status iptables.service</pre>
<div class="cnblogs_code_toolbar"><span class="cnblogs_code_copy"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" title="复制代码"><img src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/copycode.gif" alt="复制代码"></a></span></div></div>
<p>&nbsp;</p>
<p>解决vsftpd在iptables开启后,无法使用被动模式的问题</p>
<p><span style="line-height: 1.5;">1.首先在/etc/sysconfig/iptables-config中修改或者添加以下内容</span></p>
<div class="cnblogs_code">
<pre><span style="color: #008000;">#</span><span style="color: #008000;">添加以下内容,注意顺序不能调换</span>
IPTABLES_MODULES=<span style="color: #800000;">"</span><span style="color: #800000;">ip_conntrack_ftp</span><span style="color: #800000;">"</span><span style="color: #000000;">
IPTABLES_MODULES</span>=<span style="color: #800000;">"</span><span style="color: #800000;">ip_nat_ftp</span><span style="color: #800000;">"</span></pre>
</div>
<p><span style="line-height: 1.5;">2.重新设置iptables设置</span></p>
<div class="cnblogs_code">
<pre>iptables -A INPUT -m state --state  <strong>RELATED,</strong>ESTABLISHED -j ACCEPT</pre>
</div>
<p>&nbsp;</p>
<p><strong><span style="line-height: 1.5;">以下为完整设置脚本</span></strong></p>
<div class="cnblogs_code"><div class="cnblogs_code_toolbar"><span class="cnblogs_code_copy"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" title="复制代码"><img src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/copycode.gif" alt="复制代码"></a></span></div>
<pre><span style="color: #008000;">#</span><span style="color: #008000;">!/bin/sh</span>
iptables -<span style="color: #000000;">P INPUT ACCEPT
iptables </span>-<span style="color: #000000;">F
iptables </span>-<span style="color: #000000;">X
iptables </span>-<span style="color: #000000;">Z
iptables </span>-A INPUT -i lo -<span style="color: #000000;">j ACCEPT
iptables </span>-A INPUT -p tcp --dport 22 -<span style="color: #000000;">j ACCEPT
iptables </span>-A INPUT -p tcp --dport 21 -<span style="color: #000000;">j ACCEPT
iptables </span>-A INPUT -p tcp --dport 80 -<span style="color: #000000;">j ACCEPT
iptables </span>-A INPUT -p tcp --dport 443 -<span style="color: #000000;">j ACCEPT
iptables </span>-A INPUT -p icmp --icmp-type 8 -<span style="color: #000000;">j ACCEPT
iptables </span>-A INPUT -m state --state RELATED,ESTABLISHED -<span style="color: #000000;">j ACCEPT
iptables </span>-<span style="color: #000000;">P INPUT DROP
iptables </span>-<span style="color: #000000;">P OUTPUT ACCEPT
iptables </span>-<span style="color: #000000;">P FORWARD DROP
service iptables save
systemctl restart iptables.service</span></pre>
<div class="cnblogs_code_toolbar"><span class="cnblogs_code_copy"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" title="复制代码"><img src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/copycode.gif" alt="复制代码"></a></span></div></div>
<p>&nbsp;</p></div><div id="MySignature"></div>
<div class="clear"></div>
<div id="blog_post_info_block">
<div id="BlogPostCategory">分类: <a href="http://www.cnblogs.com/kreo/category/649046.html" target="_blank">Linux</a></div>
<div id="EntryTag"></div>
<div id="blog_post_info"><div id="green_channel">
        <a href="javascript:void(0);" id="green_channel_digg" onclick="DiggIt(4368811,cb_blogId,1);green_channel_success(this,&#39;谢谢推荐！&#39;);">好文要顶</a>
            <a id="green_channel_follow" onclick="follow(&#39;e2f1f881-4a59-de11-9510-001cf0cd104b&#39;);" href="javascript:void(0);">关注我</a>
    <a id="green_channel_favorite" onclick="AddToWz(cb_entryId);return false;" href="javascript:void(0);">收藏该文</a>
    <a id="green_channel_weibo" href="javascript:void(0);" title="分享至新浪微博" onclick="ShareToTsina()"><img src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/icon_weibo_24.png" alt=""></a>
    <a id="green_channel_wechat" href="javascript:void(0);" title="分享至微信" onclick="shareOnWechat()"><img src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/wechat.png" alt=""></a>
</div>
<div id="author_profile">
    <div id="author_profile_info" class="author_profile_info">
            <a href="http://home.cnblogs.com/u/kreo/" target="_blank"><img src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/sample_face.gif" class="author_avatar" alt=""></a>
        <div id="author_profile_detail" class="author_profile_info">
            <a href="http://home.cnblogs.com/u/kreo/">太清</a><br>
            <a href="http://home.cnblogs.com/u/kreo/followees">关注 - 0</a><br>
            <a href="http://home.cnblogs.com/u/kreo/followers">粉丝 - 34</a>
        </div>
    </div>
    <div class="clear"></div>
    <div id="author_profile_honor"></div>
    <div id="author_profile_follow">
                <a href="javascript:void(0);" onclick="follow(&#39;e2f1f881-4a59-de11-9510-001cf0cd104b&#39;);return false;">+加关注</a>
    </div>
</div>
<div id="div_digg">
    <div class="diggit" onclick="votePost(4368811,&#39;Digg&#39;)">
        <span class="diggnum" id="digg_count">3</span>
    </div>
    <div class="buryit" onclick="votePost(4368811,&#39;Bury&#39;)">
        <span class="burynum" id="bury_count">0</span>
    </div>
    <div class="clear"></div>
    <div class="diggword" id="digg_tips">
    </div>
</div>
</div>
<div class="clear"></div>
<div id="post_next_prev"><a href="http://www.cnblogs.com/kreo/p/4344722.html" class="p_n_p_prefix">« </a> 上一篇：<a href="http://www.cnblogs.com/kreo/p/4344722.html" title="发布于2015-03-17 16:21">Spring常用工具类</a><br><a href="http://www.cnblogs.com/kreo/p/4378086.html" class="p_n_p_prefix">» </a> 下一篇：<a href="http://www.cnblogs.com/kreo/p/4378086.html" title="发布于2015-03-30 15:11">Linux下安装nginx</a><br></div>
</div>

</div>
    <p class="postfoot">posted on <span id="post-date">2015-03-26 15:14</span> <a href="http://www.cnblogs.com/kreo/">太清</a> 阅读(<span id="post_view_count">30049</span>) 评论(<span id="post_comment_count">1</span>)  <a href="https://i.cnblogs.com/EditPosts.aspx?postid=4368811" rel="nofollow">编辑</a> <a href="http://www.cnblogs.com/kreo/p/4368811.html#" onclick="AddToWz(4368811);return false;">收藏</a></p>
</div>
<script type="text/javascript">var allowComments=true,cb_blogId=57497,cb_entryId=4368811,cb_blogApp=currentBlogApp,cb_blogUserGuid='e2f1f881-4a59-de11-9510-001cf0cd104b',cb_entryCreatedDate='2015/3/26 15:14:00';loadViewCount(cb_entryId);</script>

</div><a name="!comments"></a><div id="blog-comments-placeholder"><div id="comments_pager_top"></div>
<a name="评论"></a>
<div id="comments">
<h3>评论</h3>
	
	
			<h4>
				<a href="http://www.cnblogs.com/kreo/p/4368811.html#3294765" class="layer">#1楼</a><a name="3294765" id="comment_anchor_3294765"></a><span id="comment-maxId" style="display:none;">3294765</span><span id="comment-maxDate" style="display:none;">2015/10/29 17:10:51</span>
					<span>
						 <span class="comment_date">2015-10-29 17:10</span>
					</span>
				<a id="a_comment_author_3294765" href="http://www.cnblogs.com/yujibuzailai/" target="_blank">hudeyong_1</a> <a href="http://msg.cnblogs.com/send/hudeyong_1" title="发送站内短消息" class="sendMsg2This">&nbsp;</a>
			</h4>
			<p>
				</p><div id="comment_body_3294765" class="blog_comment_body">标题党啊，能不能出一篇firewalld的 ==</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(3294765,&#39;Digg&#39;,this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(3294765,&#39;Bury&#39;,this)">反对(0)</a></div>
				&nbsp;&nbsp;<span class="comment_actions"></span>
			<p></p>
		
</div><div id="comments_pager_bottom"></div></div><script type="text/javascript">var commentManager = new blogCommentManager();commentManager.renderComments(0);</script>
<div id="comment_form" class="commentform">
<a name="commentform"></a>
<div id="divCommentShow"></div>
<div id="comment_nav"><span id="span_refresh_tips"></span><a href="javascript:void(0);" onclick="return RefreshCommentList();" id="lnk_RefreshComments" runat="server" clientidmode="Static">刷新评论</a><a href="http://www.cnblogs.com/kreo/p/4368811.html#" onclick="return RefreshPage();">刷新页面</a><a href="http://www.cnblogs.com/kreo/p/4368811.html#top">返回顶部</a></div>
<div id="comment_form_container"><div class="login_tips">注册用户登录后才能发表评论，请 <a rel="nofollow" href="javascript:void(0);" class="underline" onclick="return login(&#39;commentform&#39;);">登录</a> 或 <a rel="nofollow" href="javascript:void(0);" class="underline" onclick="return register();">注册</a>，<a href="http://www.cnblogs.com/">访问</a>网站首页。</div></div>
<div class="ad_text_commentbox" id="ad_text_under_commentbox"></div>
<div id="ad_t2"><a href="http://www.ucancode.com/index.htm" target="_blank">【推荐】50万行VC++源码: 大型组态工控、电力仿真CAD与GIS源码库</a><br><a href="https://cloud.tencent.com/developer/labs?fromSource=gwzcw.241259.241259.241259" target="_blank">【免费】从零开始学编程，开发者专属实验平台免费实践！</a><br><a href="https://console.upyun.com/register/?invite=H124C2iMZ?utm_source=cnblogs&amp;utm_medium=referral" target="_blank">【推荐】现在注册又拍云，首月可享 200G CDN流量，还可免费申请 SSL 证书</a><br></div>
<div id="opt_under_post"></div>
<div id="cnblogs_c1" class="c_ad_block"><a href="http://click.aliyun.com/m/19236/" target="_blank"><img width="300" height="250" src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/24442-20170502163240086-1545306933.jpg" alt="阿里云B1"></a></div>
<div id="under_post_news"><div class="itnews c_ad_block"><b>最新IT新闻</b>:<br> ·  <a href="http://news.cnblogs.com/n/573914/" target="_blank">Hyperloop One离梦想越来越近 超级高铁或首先出现在这些地方</a><br> ·  <a href="http://news.cnblogs.com/n/573913/" target="_blank">靠一台手机和一个纸箱，17岁的他竟然“颠覆”了传统医疗</a><br> ·  <a href="http://news.cnblogs.com/n/573912/" target="_blank">继中国市场后 Uber又与俄罗斯最大的对手合并了</a><br> ·  <a href="http://news.cnblogs.com/n/573911/" target="_blank">《我的世界》著名宝可梦MOD关闭 因宝可梦公司要求</a><br> ·  <a href="http://news.cnblogs.com/n/573910/" target="_blank">没有CEO的Uber还能挺多久？</a><br>» <a href="http://news.cnblogs.com/" title="IT新闻" target="_blank">更多新闻...</a></div></div>
<div id="cnblogs_c2" class="c_ad_block"><a href="https://www.jiguang.cn/devservice?source=bky&amp;hmsr=%E5%8D%9A%E5%AE%A2%E5%9B%AD&amp;hmpl=&amp;hmcu=&amp;hmkw=&amp;hmci=" target="_blank"><img width="468" height="60" src="./CentOS7安装iptables防火墙 - 太清 - 博客园_files/24442-20170629165247758-2056260207.png" alt="极光推广_0701"></a></div>
<div id="under_post_kb"><div class="itnews c_ad_block" id="kb_block"><b>最新知识库文章</b>:<br><div id="kb_recent"> ·  <a href="http://kb.cnblogs.com/page/570194/" target="_blank">小printf的故事：什么是真正的程序员？</a><br> ·  <a href="http://kb.cnblogs.com/page/569992/" target="_blank">程序员的工作、学习与绩效</a><br> ·  <a href="http://kb.cnblogs.com/page/569056/" target="_blank">软件开发为什么很难</a><br> ·  <a href="http://kb.cnblogs.com/page/565901/" target="_blank">唱吧DevOps的落地，微服务CI/CD的范本技术解读</a><br> ·  <a href="http://kb.cnblogs.com/page/566523/" target="_blank">程序员，如何从平庸走向理想？</a><br></div>» <a href="http://kb.cnblogs.com/" target="_blank">更多知识库文章...</a></div></div>
<div id="HistoryToday" class="c_ad_block"></div>
<script type="text/javascript">
    fixPostBody();
    setTimeout(function () { incrementViewCount(cb_entryId); }, 50);
    deliverAdT2();
    deliverAdC1();
    deliverAdC2();    
    loadNewsAndKb();
    loadBlogSignature();
    LoadPostInfoBlock(cb_blogId, cb_entryId, cb_blogApp, cb_blogUserGuid);
    GetPrevNextPost(cb_entryId, cb_blogId, cb_entryCreatedDate);
    loadOptUnderPost();
    GetHistoryToday(cb_blogId, cb_blogApp, cb_entryCreatedDate);   
</script>
</div>


</div>
<div id="rightmenu">
	
		
<div id="my_links">
<h3>导航</h3>
<ul>
<li><a id="blog_nav_sitehome" href="http://www.cnblogs.com/">博客园</a></li>
<li><a id="blog_nav_myhome" href="http://www.cnblogs.com/kreo/">首页</a></li>
<!--<li><a id="blog_nav_newpost" rel="nofollow" href="https://i.cnblogs.com/EditPosts.aspx?opt=1">新随笔</a></li>-->
<li><a id="blog_nav_contact" rel="nofollow" href="https://msg.cnblogs.com/send/%E5%A4%AA%E6%B8%85">联系</a></li>
<li><a id="blog_nav_rss" href="http://www.cnblogs.com/kreo/rss">订阅</a></li><!--<a id="blog_nav_rss_image" href="http://www.cnblogs.com/kreo/rss"><img src="//www.cnblogs.com/images/xml.gif" alt="订阅" /></a>-->
<li><a id="blog_nav_admin" rel="nofollow" href="https://i.cnblogs.com/">管理</a></li>
</ul>
</div>
		<div id="blog-calendar" style=""><table id="blogCalendar" class="Cal" cellspacing="0" cellpadding="0" title="Calendar">
	<tbody><tr><td colspan="7"><table class="CalTitle" cellspacing="0">
		<tbody><tr><td class="CalNextPrev"><a href="javascript:void(0);" onclick="loadBlogCalendar(&#39;2017/06/01&#39;);return false;">&lt;</a></td><td align="center">2017年7月</td><td class="CalNextPrev" align="right"><a href="javascript:void(0);" onclick="loadBlogCalendar(&#39;2017/08/01&#39;);return false;">&gt;</a></td></tr>
	</tbody></table></td></tr><tr><th class="CalDayHeader" align="center" abbr="日" scope="col">日</th><th class="CalDayHeader" align="center" abbr="一" scope="col">一</th><th class="CalDayHeader" align="center" abbr="二" scope="col">二</th><th class="CalDayHeader" align="center" abbr="三" scope="col">三</th><th class="CalDayHeader" align="center" abbr="四" scope="col">四</th><th class="CalDayHeader" align="center" abbr="五" scope="col">五</th><th class="CalDayHeader" align="center" abbr="六" scope="col">六</th></tr><tr><td class="CalOtherMonthDay" align="center">25</td><td class="CalOtherMonthDay" align="center">26</td><td class="CalOtherMonthDay" align="center">27</td><td class="CalOtherMonthDay" align="center">28</td><td class="CalOtherMonthDay" align="center">29</td><td class="CalOtherMonthDay" align="center">30</td><td class="CalWeekendDay" align="center">1</td></tr><tr><td class="CalWeekendDay" align="center">2</td><td align="center">3</td><td align="center">4</td><td align="center">5</td><td align="center">6</td><td align="center">7</td><td class="CalWeekendDay" align="center">8</td></tr><tr><td class="CalWeekendDay" align="center">9</td><td align="center">10</td><td align="center">11</td><td align="center">12</td><td align="center">13</td><td align="center">14</td><td class="CalTodayDay" align="center">15</td></tr><tr><td class="CalWeekendDay" align="center">16</td><td align="center">17</td><td align="center">18</td><td align="center">19</td><td align="center">20</td><td align="center">21</td><td class="CalWeekendDay" align="center">22</td></tr><tr><td class="CalWeekendDay" align="center">23</td><td align="center">24</td><td align="center">25</td><td align="center">26</td><td align="center">27</td><td align="center">28</td><td class="CalWeekendDay" align="center">29</td></tr><tr><td class="CalWeekendDay" align="center">30</td><td align="center">31</td><td class="CalOtherMonthDay" align="center">1</td><td class="CalOtherMonthDay" align="center">2</td><td class="CalOtherMonthDay" align="center">3</td><td class="CalOtherMonthDay" align="center">4</td><td class="CalOtherMonthDay" align="center">5</td></tr>
</tbody></table></div><script type="text/javascript">loadBlogDefaultCalendar();</script>
		
<h3>公告</h3>
<div class="newsItem">
	<div id="blog-news"><div id="profile_block">昵称：<a href="http://home.cnblogs.com/u/kreo/">太清</a><br>园龄：<a href="http://home.cnblogs.com/u/kreo/" title="入园时间：2009-06-15">8年1个月</a><br>粉丝：<a href="http://home.cnblogs.com/u/kreo/followers/">34</a><br>关注：<a href="http://home.cnblogs.com/u/kreo/followees/">0</a><div id="p_b_follow"><a href="javascript:void(0);" onclick="follow(&#39;e2f1f881-4a59-de11-9510-001cf0cd104b&#39;)">+加关注</a></div></div></div><script type="text/javascript">loadBlogNews();</script>
</div>		
		<div id="blog_stats">
<div id="blog_stats">
<h3>统计</h3>
<ul>
<li>随笔 - 45
</li><li>文章 - 0
</li><li>评论 - 16
<!--<li>引用 - 0-->
</li>
</ul>
</div></div>
		<div id="blog-sidecolumn"><div id="sidebar_search" class="sidebar-block">
<div id="sidebar_search" class="mySearch">
<h3 class="catListTitle">搜索</h3>
<div id="sidebar_search_box">
<div id="widget_my_zzk" class="div_my_zzk"><input type="text" id="q" onkeydown="return zzk_go_enter(event);" class="input_my_zzk">&nbsp;<input onclick="zzk_go()" type="button" value="找找看" id="btnZzk" class="btn_my_zzk"></div>

</div>
</div>

</div><div id="sidebar_toptags" class="sidebar-block"></div><div id="sidebar_categories">
		<h3>随笔分类</h3>
		
				<ul>
			
				<li><a id="CatList_LinkList_0_Link_0" href="http://www.cnblogs.com/kreo/category/649048.html">DB(9)</a> </li>
			
				<li><a id="CatList_LinkList_0_Link_1" href="http://www.cnblogs.com/kreo/category/195587.html">Java(5)</a> </li>
			
				<li><a id="CatList_LinkList_0_Link_2" href="http://www.cnblogs.com/kreo/category/195618.html">JavaScript</a> </li>
			
				<li><a id="CatList_LinkList_0_Link_3" href="http://www.cnblogs.com/kreo/category/649046.html">Linux(15)</a> </li>
			
				<li><a id="CatList_LinkList_0_Link_4" href="http://www.cnblogs.com/kreo/category/667425.html">MVC(2)</a> </li>
			
				<li><a id="CatList_LinkList_0_Link_5" href="http://www.cnblogs.com/kreo/category/649052.html">Other(2)</a> </li>
			
				<li><a id="CatList_LinkList_0_Link_6" href="http://www.cnblogs.com/kreo/category/649050.html">Revision Control(4)</a> </li>
			
				<li><a id="CatList_LinkList_0_Link_7" href="http://www.cnblogs.com/kreo/category/649086.html">Web Server(7)</a> </li>
			
				<li><a id="CatList_LinkList_0_Link_8" href="http://www.cnblogs.com/kreo/category/649051.html">Windows(5)</a> </li>
			
				</ul>
			
	
		<h3>随笔档案</h3>
		
				<ul>
			
				<li><a id="CatList_LinkList_1_Link_0" href="http://www.cnblogs.com/kreo/archive/2017/05.html">2017年5月 (1)</a> </li>
			
				<li><a id="CatList_LinkList_1_Link_1" href="http://www.cnblogs.com/kreo/archive/2017/01.html">2017年1月 (1)</a> </li>
			
				<li><a id="CatList_LinkList_1_Link_2" href="http://www.cnblogs.com/kreo/archive/2016/07.html">2016年7月 (1)</a> </li>
			
				<li><a id="CatList_LinkList_1_Link_3" href="http://www.cnblogs.com/kreo/archive/2016/06.html">2016年6月 (1)</a> </li>
			
				<li><a id="CatList_LinkList_1_Link_4" href="http://www.cnblogs.com/kreo/archive/2016/05.html">2016年5月 (1)</a> </li>
			
				<li><a id="CatList_LinkList_1_Link_5" href="http://www.cnblogs.com/kreo/archive/2016/03.html">2016年3月 (2)</a> </li>
			
				<li><a id="CatList_LinkList_1_Link_6" href="http://www.cnblogs.com/kreo/archive/2015/12.html">2015年12月 (1)</a> </li>
			
				<li><a id="CatList_LinkList_1_Link_7" href="http://www.cnblogs.com/kreo/archive/2015/10.html">2015年10月 (1)</a> </li>
			
				<li><a id="CatList_LinkList_1_Link_8" href="http://www.cnblogs.com/kreo/archive/2015/09.html">2015年9月 (2)</a> </li>
			
				<li><a id="CatList_LinkList_1_Link_9" href="http://www.cnblogs.com/kreo/archive/2015/07.html">2015年7月 (1)</a> </li>
			
				<li><a id="CatList_LinkList_1_Link_10" href="http://www.cnblogs.com/kreo/archive/2015/04.html">2015年4月 (9)</a> </li>
			
				<li><a id="CatList_LinkList_1_Link_11" href="http://www.cnblogs.com/kreo/archive/2015/03.html">2015年3月 (8)</a> </li>
			
				<li><a id="CatList_LinkList_1_Link_12" href="http://www.cnblogs.com/kreo/archive/2015/01.html">2015年1月 (13)</a> </li>
			
				<li><a id="CatList_LinkList_1_Link_13" href="http://www.cnblogs.com/kreo/archive/2009/08.html">2009年8月 (1)</a> </li>
			
				<li><a id="CatList_LinkList_1_Link_14" href="http://www.cnblogs.com/kreo/archive/2009/06.html">2009年6月 (2)</a> </li>
			
				</ul>
			
	</div><div id="sidebar_recentcomments" class="sidebar-block"><div id="recent_comments_wrap">
<h3 class="catListTitle">最新评论</h3>
<div class="RecentComment" id="RecentComments">
	<div id="RecentCommentsBlock"><ul>
        <li class="recent_comment_title"><a href="http://www.cnblogs.com/kreo/p/4423362.html#3645437">1. Re:redis.conf配置详细解析</a></li>
        <li class="recent_comment_body">学习</li>
        <li class="recent_comment_author">--NewSea</li>
        <li class="recent_comment_title"><a href="http://www.cnblogs.com/kreo/p/4344668.html#3542126">2. Re:SpringMVC 基于注解的Controller详解</a></li>
        <li class="recent_comment_body">学习了，总结很好，明了整洁</li>
        <li class="recent_comment_author">--绿豆糕小姐</li>
        <li class="recent_comment_title"><a href="http://www.cnblogs.com/kreo/p/4344668.html#3517641">3. Re:SpringMVC 基于注解的Controller详解</a></li>
        <li class="recent_comment_body">感谢分享</li>
        <li class="recent_comment_author">--一条小江鱼</li>
        <li class="recent_comment_title"><a href="http://www.cnblogs.com/kreo/p/4399612.html#3516410">4. Re:CentOS7安装配置redis-3.0.0</a></li>
        <li class="recent_comment_body">redis-trib.rb 文件在redis源文件夹里找不到，在配置的redis-server里也找不到啊。。。。。。文件要去哪里找啊</li>
        <li class="recent_comment_author">--沛国紫阳</li>
        <li class="recent_comment_title"><a href="http://www.cnblogs.com/kreo/p/4423362.html#3481943">5. Re:redis.conf配置详细解析</a></li>
        <li class="recent_comment_body">学习到了</li>
        <li class="recent_comment_author">--WananPr1st</li>
</ul>
</div>
</div>
</div></div><div id="sidebar_topviewedposts" class="sidebar-block"><div id="topview_posts_wrap">
<h3 class="catListTitle">阅读排行榜</h3>
<div class="RecentComment" id="TopViewPosts"> 
	<div id="TopViewPostsBlock"><ul><li><a href="http://www.cnblogs.com/kreo/p/4344668.html">1. SpringMVC 基于注解的Controller详解(68073)</a></li><li><a href="http://www.cnblogs.com/kreo/p/4423362.html">2. redis.conf配置详细解析(64554)</a></li><li><a href="http://www.cnblogs.com/kreo/p/4399612.html">3. CentOS7安装配置redis-3.0.0(33155)</a></li><li><a href="http://www.cnblogs.com/kreo/p/4368811.html">4. CentOS7安装iptables防火墙(30047)</a></li><li><a href="http://www.cnblogs.com/kreo/p/4434802.html">5. Tomcat调优(22126)</a></li></ul></div>
</div>
</div></div><div id="sidebar_topcommentedposts" class="sidebar-block"><div id="topfeedback_posts_wrap">
<h3 class="catListTitle">评论排行榜</h3>
<div class="RecentComment" id="TopCommentsPosts">
	<div id="TopFeedbackPostsBlock"><ul><li><a href="http://www.cnblogs.com/kreo/p/4399612.html">1. CentOS7安装配置redis-3.0.0(5)</a></li><li><a href="http://www.cnblogs.com/kreo/p/4344668.html">2. SpringMVC 基于注解的Controller详解(5)</a></li><li><a href="http://www.cnblogs.com/kreo/p/4423362.html">3. redis.conf配置详细解析(2)</a></li><li><a href="http://www.cnblogs.com/kreo/p/4221379.html">4. StartSSL免费证书申请笔记(2)</a></li><li><a href="http://www.cnblogs.com/kreo/p/4368811.html">5. CentOS7安装iptables防火墙(1)</a></li></ul></div>
</div></div></div><div id="sidebar_topdiggedposts" class="sidebar-block"><div id="topdigg_posts_wrap">
<h3 class="catListTitle">推荐排行榜</h3>
<div class="RecentComment">
	<div id="TopDiggPostsBlock"><ul><li><a href="http://www.cnblogs.com/kreo/p/4344668.html">1. SpringMVC 基于注解的Controller详解(6)</a></li><li><a href="http://www.cnblogs.com/kreo/p/4423362.html">2. redis.conf配置详细解析(3)</a></li><li><a href="http://www.cnblogs.com/kreo/p/4368811.html">3. CentOS7安装iptables防火墙(3)</a></li><li><a href="http://www.cnblogs.com/kreo/p/4399612.html">4. CentOS7安装配置redis-3.0.0(1)</a></li><li><a href="http://www.cnblogs.com/kreo/p/4392090.html">5. CentOS7安装mysql5.6.23(1)</a></li></ul></div>
</div></div></div></div><script type="text/javascript">loadBlogSideColumn();</script>
        
		
<div id="footer">
	Powered by: 
	<br>
	
	<a id="Footer1_Hyperlink3" name="Hyperlink1" href="http://www.cnblogs.com/" style="font-family:Verdana;font-size:12px;">博客园</a>
	<br>
	Copyright © 太清
</div>
	
</div>			
			
	



</body></html>